package com.study.samsung.Entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

//订单表实体类
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Orders {
    private Integer did;//订单id
    private String dxnumber;//订单编号
    private String dtime;//下单时间
    private String dstatus;//订单状态
    private String pay; //支付方式
    private BigDecimal dtotal;//订单总金额
    private Integer uid;
    private Boolean isdel;
    private Integer aid;

    private OrderDetails orderDetails;
    private Address address;
    private User user;

//    public Orders(Integer did, String dxnumber, String dtime, String dstatus, String pay, BigDecimal dtotal, Integer uid, Boolean isdel, Integer aid, OrderDetails orderDetails, Address address) {
//        this.did = did;
//        this.dxnumber = dxnumber;
//        this.dtime = dtime;
//        this.dstatus = dstatus;
//        this.pay = pay;
//        this.dtotal = dtotal;
//        this.uid = uid;
//        this.isdel = isdel;
//        this.aid = aid;
//        this.orderDetails = orderDetails;
//        this.address = address;
//    }

        public Orders(Integer did, String dxnumber, String dtime, String dstatus, String pay, BigDecimal dtotal, Integer uid, Boolean isdel, Integer aid, OrderDetails orderDetails) {
        this.did = did;
        this.dxnumber = dxnumber;
        this.dtime = dtime;
        this.dstatus = dstatus;
        this.pay = pay;
        this.dtotal = dtotal;
        this.uid = uid;
        this.isdel = isdel;
        this.aid = aid;
        this.orderDetails = orderDetails;
    }



    public Orders(Integer did, String dxnumber, String dtime, String dstatus, String pay, BigDecimal dtotal, Integer uid, Boolean isdel, Integer aid) {
        this.did = did;
        this.dxnumber = dxnumber;
        this.dtime = dtime;
        this.dstatus = dstatus;
        this.pay = pay;
        this.dtotal = dtotal;
        this.uid = uid;
        this.isdel = isdel;
        this.aid = aid;
    }
}
